package pl.perseus.action;

import lombok.Getter;
import lombok.Setter;

import org.springframework.beans.factory.annotation.Autowired;

import pl.perseus.model.User;
import pl.perseus.service.user.IUserService;

public class EditUserAction extends BaseAction {

	@Getter
	@Setter
	User user;
	
	@Getter
	@Setter
	String confirmPassword;
	
	@Autowired
	IUserService userService;
	
	@Override
	public String execute() {
		userService.updateUser(user);
		logAction("Editing user: " + user.getLogin());
		return SUCCESS;
	}

}
